const express = require('express');
const path = require('path');

// 创建 Express 应用实例
const app = express();

// 指定静态文件目录
const staticPath = path.join(__dirname, 'public');
app.use(express.static(staticPath));

// 启动服务器，监听指定端口
const port = 3000;
app.listen(port, () => {
  console.log(`服务器运行在 http://localhost:${port}`);
});